package com.google.code.irouter.portal.client.dashboard.main.center;

import com.google.code.irouter.portal.client.dashboard.main.center.managers.External;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.Library;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.Log;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.Queue;
import com.google.code.irouter.portal.client.dashboard.main.center.managers.Relation;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.TabPanel;

public final class Managers extends TabPanel {

	public Managers() {
		super();
		this.setId(Managers.class.getName());
		
		this.setBorder(false);
		this.setTabWidth(180);
		this.add(new Relation());
		this.add(new Library());
		this.add(new External());
		this.add(new Queue());
		this.add(new Log());
	}
	
	public void mask() {
		Component[] items = this.getItems();
		for(Component item : items) {
			item.setDisabled(true);
		}
	}
	
	public void unmask() {
		Component[] items = this.getItems();
		for(Component item : items) {
			item.setDisabled(false);
		}
	}

}
